<?php

namespace api\subsite\controller;

class AdminIndexController extends \Aaa\subsite\controller\AdminIndexController {
    public $baseField = [
        [
            'field' => 'id',
            'name' => 'ID',
        ],
        [
            'field' => 'status',
            'name' => '状态',
            'type' => 'switch',
        ],
        [
            'field' => 'user_id',
            'name' => '用户ID',
        ],
        [
            'field' => 'share_goods_buy_pct',
            'name' => '买家完成交易分成',
            'remark' => '交易手续费的百分比分成，输入数字，单位：%',
        ],
        [
            'field' => 'share_goods_sell_pct',
            'name' => '卖家完成交易分成',
            'remark' => '交易手续费的百分比分成，输入数字，单位：%',
        ],
        [
            'field' => 'inviter',
            'name' => '上级分站ID',
            'remark' => '这里是分站ID，非用户ID',
        ],
        [
            'field' => 'inviter_share_pct',
            'name' => '上级代分站分成',
            'remark' => '交易手续费的百分比分成，输入数字，单位：%',
        ],
        [
            'field' => 'share_amount',
            'name' => '分成金额',
            'remark' => '分站已得分成',
        ],
        [
            'field' => 'remark',
            'name' => '备注',
        ],
        [
            'field' => 'site_name',
            'name' => '平台名称',
        ],
        [
            'field' => 'h5_url',
            'name' => 'H5端网址',
            'remark' => '带http或https，示例：https://h5.pnsss.com/',
        ],
        [
            'field' => 'mobile_logo',
            'name' => '移动端LOGO',
            'type' => 'image',
            'remark' => '此设置为运行APP后显示的LOGO。安装APP后，在手机桌面显示的LOGO需要在打包的时候单独上传',
        ],
        [
            'field' => 'app_android_download_url',
            'name' => 'APP下载地址',
            'remark' => 'Android',
        ],
        [
            'field' => 'app_ios_download_url',
            'name' => 'APP下载地址',
            'remark' => 'iOS',
        ],
        [
            'field' => 'pc_url',
            'name' => 'PC端网址',
            'remark' => '带http或https，示例：https://pc.pnsss.com/',
        ],
        [
            'field' => 'pc_logo',
            'name' => 'PC端LOGO',
            'type' => 'image',
            'remark' => '最佳尺寸：400px * 120px',
        ],
        [
            'field' => 'icp',
            'name' => 'ICP备案号',
        ],
        [
            'field' => 'gwa',
            'name' => '公网安备案号'
        ],
        [
            'field' => 'bottom_info',
            'name' => '底部信息',
            'type' => 'textarea',
        ],
        [
            'field' => 'create_time',
            'name' => '添加时间',
            'type' => 'time',
        ],
        [
            'field' => 'update_time',
            'name' => '修改时间',
            'type' => 'time',
        ],
    ];

    protected function beforeIndex() {
        $this->actionField = ['id', 'status', 'user_id', 'share_amount', 'remark', 'create_time', 'update_time',];
        $this->searchField = [
            'common' => [
                'status' => 'accurate',
                'user_id' => 'accurate',
                'remark' => 'fuzzy',
            ],
            'time' => ['create_time', 'update_time'],
        ];
    }

}
